home *** CD-ROM | disk | FTP | other *** search
- DOCUMENTATION FOR SCNMAP.BAS
-
- Copyright 1983 By Michael Csontos
- 3228 Livonia Center Road
- Lima, New York 14485
-
-
- INTRODUCTION
-
- If you are writing programs involving relatively fancy screen
- layouts it is very helpful to have a paper chart so you can sketch the
- appearance of the screen before writing code to print it. Such charts
- can be purchased ($15.00 for catalog #B73098 from Moore for 10 pads of 50)
- but since you are not likely to need 500 of them, it is worthwhile to have
- your printer make them one at a time.
-
- This program will print a form on 8½ x 11" paper for laying out
- either 40 column or 80 column screens. It will also print forms that show
- the addresses in the color graphics board memory for each character in the
- alphanumeric mode for both screen widths.
-
-
- This program has printer control commands for the EPSON MX-80 printer
- and may not function with other printers.
-
-
- PROGRAM OPERATION
-
- When you run the program you will be presented with a choice of four
- options; 40 or 80 column charts, either blank or filled. Simply make sure the
- printer is ready and press a number. The printer will print out the form and
- then the program will rerun itself so that you can immediately choose another
- option. Press <Esc> at this time to end the program.
-
- To stop printing in the middle of a chart, take the printer off-line.
- The program will wait for the printer to go back on-line. To end the program
- in the middle of printing, use <Ctrl>+<Break>. Since the program reinitialises
- the printer and there is only one keystroke to enter, there was no reason
- for a more complicated ending sequence.
-
- Since the program uses the [INKEY$] function to enter its one
- character and doesn't have an [END] statement, the keyboard buffer will hold
- up to 15 entries until they are used by the program. Thus if you want three
- copies of a blank 40 column form just press <1>, <1>, <1> and the printer
- will print three forms (assuming continuous paper forms) and then wait for
- more instructions. This is especially useful for filled forms since they
- take a very long time to print and you may want to leave the printer.
-
- It is recommended that you use a weak ribbon to print the filled forms
- as this will make the very small numbers easier to read and allow you to
- draw your layout over the form.
-
-
- APPLICATIONS
-
- In BASIC the command [LOCATE l,c] can be used to place the cursor
- anywhere on the screen. You can lay out the format you want to use for data on
- the screen using the blank forms printed by this program, then read off the
- line number l (1 to 25) and the column number c (1 to 40 or 80) from the border
- of the form for the first character of what you want to print. Then use the
- program line: LOCATE l,c:PRINT "dd.........dddd" to put your phrase or data
- there.
-
- Line 25 has special characeristics in that the function key functions
- are normally displayed there. To use that line, you must have used the command
- [KEY OFF] somewhere before you use the [LOCATE 25,c] command.
-
-
- Another way to manipulate the screen display is to work directly
- with the memory that is used to refresh the screen display. This can be done
- with [PEEK (n)] and [POKE n,data] commands.
-
- The circuit board that controls the CRT display has its own memory.
- For the Color-Graphics Adapter this consists of 16k of memory with a starting
- address of B8000 in hexadecimal notation. To tell BASIC that you want to
- access that block of memory you must use the command [DEF SEG=&HB800]. this
- sets things up so that the numbers (n) that you use in a [PEEK (n)] or
- [POKE n,data] command will refer to the memory on the color adapter.
- Note: The IBM Monochrome adapter uses a different memory starting address
- so addresses from the forms will not work for it.
-
- Each character location on the screen uses two bytes of memory
- in this display buffer. The first one is the character itself, in ASCII, as
- listed in the Appendix G of the IBM BASIC manual. The numbers in the filled
- 80 column chart are the addresses of these characters, as are the lower of
- the two numbers in the blocks of the 40 column filled form. For example,
- the command line LOCATE 23,1:PRINT CHR$(PEEK(86)), if entered in the width 40
- mode after [DEF SEG=&HB800] has been executed, will print in the first column
- of line 23 whatever character is found at the 4th column of line 2 of the
- screen.
-
- You could get the same result with POKE 1760,PEEK(86) under the same
- conditions. While the addresses can be calculated from line and column
- numbers, it is very convienent to be able to look them up and enter them
- directly from your screen layout.
-
- The information in the other address for each location determines how
- the character looks on the screen. It is divided into two halves; foreground
- and background. Three bits in each half control the color, while the fourth
- determines intensity for the foreground or blinking for the background.
- Since BASIC does not support binary variables, you must understand
- hexadecimal notation to control color with [POKE n,data] commands. However
- for black-and-white alphanumeric applications a table will allow you to
- control the characters appearances. In each case use the command [POKE n,&Hdd]
- where n comes from the filled form.
-
- dd appearance
-
- 07 NORMAL CHARACTER
-
- 0F HIGH INTENSITY CHARACTER
-
- 70 REVERSE VIDEO CHARACTER
-
- 87 BLINKING CHARACTER
-
- 00 BLANK (WITHOUT ERASING THE CHARACTER)
-
- 77 WHITE (WITHOUT ERASING THE CHARACTER)
-
-
- Thus if you want to convert the 2nd line of an 80 character display
- to high intensity you could use the line:
-
- FOR N=161 TO 319 STEP 2:POKE N,&H0F:NEXT N
-
- remembering that [DEF SEG=&HB00] must have been used somewhere before that.
-
- You can experiment with the other possible attributes from 00 to FF
- to see what they do or refer to pages 2-49 to 2-52 of the IBM Technical
- Reference Manual.
-
-
- ---***---
-
- The program SCNMAP.BAS and the file SCNMAP.DOC are
- made freely available for non-exclusive distribution
- to members of the Picture City Personal Computer
- Programmers Club and through software exchange with
- other users' groups as long as the author and (PC)^3
- are fully credited.
-